From: Ricardo Salveti Date: Tue, 15 Apr 2025 23:28:33 +0000 (-0300) Subject: deploy: only set aboot/abootcfg when found X-Git-Tag: archive/raspbian/2025.7-2+rpi1^2^2~6^2~4^2~35^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=cc18c051ef3eec3ac877735e8199b6e895b24491;p=ostree.git deploy: only set aboot/abootcfg when found Bootloader entry should only have aboot and abootcfg configuration entries when aboot.img is found on the system (e.g. /usr/lib/modules/$kver). Otherwise it will be always set, won't be used during boot and systemd-boot will complain about unknown lines. Tested-by: Brian Masney Signed-off-by: Ricardo Salveti --- diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 49168d4f..45445918 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -2114,17 +2114,10 @@ install_deployment_kernel (OstreeSysroot *sysroot, int new_bootversion, { g_autofree char *aboot_relpath = g_strconcat ("/", bootcsumdir, "/", aboot_fn, NULL); ostree_bootconfig_parser_set (bootconfig, "aboot", aboot_relpath); - } - else - { - g_autofree char *aboot_relpath - = g_strconcat ("/", deployment_dirpath, "/usr/lib/ostree-boot/aboot.img", NULL); - ostree_bootconfig_parser_set (bootconfig, "aboot", aboot_relpath); - } - g_autofree char *abootcfg_relpath - = g_strconcat ("/", deployment_dirpath, "/usr/lib/ostree-boot/aboot.cfg", NULL); - ostree_bootconfig_parser_set (bootconfig, "abootcfg", abootcfg_relpath); + g_autofree char *abootcfg_relpath = g_strconcat ("/", bootcsumdir, "/aboot.cfg", NULL); + ostree_bootconfig_parser_set (bootconfig, "abootcfg", abootcfg_relpath); + } if (kernel_layout->devicetree_namever) {